package com.sybil.spa.dominio.r12;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(name = "XXLO_AF_MONEDAS_V")
public class Moneda implements Serializable {

   private String clave;
   private String descripcion;

   public Moneda() {
   }

   public Moneda(String clave) {
      this.clave = clave;
   }

   @Id
   @Basic(optional = false)
   @NotNull
   @Size(min = 1, max = 15)
   @Column(name = "CURRENCY_CODE")
   public String getClave() {
      return clave;
   }

   @Basic(optional = false)
   @NotNull
   @Size(min = 1, max = 240)
   @Column(name = "DESCRIPTION")
   public String getDescripcion() {
      return descripcion;
   }

   public void setClave(String clave) {
      this.clave = clave;
   }

   public void setDescripcion(String descripcion) {
      this.descripcion = descripcion;
   }

   @Override
   public int hashCode() {
      int hash = 0;
      hash += (clave != null ? clave.hashCode() : 0);
      return hash;
   }

   @Override
   public boolean equals(Object object) {
      if (!(object instanceof Moneda)) {
         return false;
      }
      Moneda other = (Moneda) object;
      if ((this.clave == null && other.clave != null) || (this.clave != null && !this.clave.equals(other.clave))) {
         return false;
      }
      return true;
   }

   @Override
   public String toString() {
      return "Moneda[ clave=" + clave + " ]";
   }
}
